package a.j;

import a.c.v;
import a.d.k;
import a.d.r;
import a.d.w;

import java.awt.geom.GeneralPath;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;

class ye
{
  private static final byte a = 1;
  private static final byte c = 2;
  private static final byte d = 3;
  
  public static byte a(tb paramtb, GeneralPath paramGeneralPath1, GeneralPath paramGeneralPath2, Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    boolean bool4 = ld.E;
    boolean bool3 = ld.D;
    byte b1 = 0;
    float f1 = paramtb.D().getLineWidth();
    if ((bool4) || (f1 != 1.0D)) {
      f1 = 1.0F + (f1 - 1.0F) / 8.0F;
    }
    PathIterator localPathIterator = paramGeneralPath1.getPathIterator(null, 0.5D);
    ld localld1 = paramtb.h();
    ld localld2 = paramtb.g();
    jd localjd1 = localld1.a(paramtb.h);
    jd localjd2 = localld2.a(paramtb.i);
    boolean bool1;
    if ((bool4) || (localjd1 != null))
    {
      w localw1 = jd.c((jd)localjd1);
      localw2 = paramtb.c();
      if (!bool4) {}
      bool1 = w.a(localw1, localw2) < 1.0E-012D;
      if ((!bool4) && (!bool3)) {}
    }
    else
    {
      bool1 = false;
    }
    boolean bool2;
    if ((bool4) || (localjd2 != null))
    {
      localw2 = jd.c((jd)localjd2);
      w localw3 = paramtb.d();
      if (!bool4) {}
      bool2 = w.a(localw2, localw3) < 1.0E-012D;
      if (bool4) {
        break label222;
      }
      if (!bool3) {}
    }
    else
    {
      bool2 = false;
    }
    label222:
    w localw2 = a(bool1, bool1 ? localjd1 : paramtb.k(), localld1);
    float f2 = (float)localw2.a();
    float f3 = (float)localw2.b();
    float[] arrayOfFloat1 = new float[2];
    if ((bool4) || (!localPathIterator.isDone()))
    {
      localPathIterator.currentSegment(arrayOfFloat1);
      f2 = arrayOfFloat1[0];
      f3 = arrayOfFloat1[1];
    }
    Point2D.Double localDouble = new Point2D.Double();
    if (!bool4) {}
    byte b2 = bool1 ? 1 : 3;
    ld localld3 = bool1 ? localjd1 : localld1;
    if (!localPathIterator.isDone())
    {
      localPathIterator.currentSegment(arrayOfFloat1);
      localPathIterator.next();
    }
    while (bool4)
    {
      if (bool3) {
        break label420;
      }
      if (a(bool1, localld3, arrayOfFloat1[0], arrayOfFloat1[1]))
      {
        f2 = arrayOfFloat1[0];
        f3 = arrayOfFloat1[1];
        if (!bool3) {
          break;
        }
      }
    }
    label420:
    Object localObject = new float[32];
    int i = 0;
    if (!bool4)
    {
      if (a(b2, localld3, localld1, f2, f3, arrayOfFloat1[0], arrayOfFloat1[1], localDouble))
      {
        localObject[(i++)] = ((float)localDouble.getX());
        localObject[(i++)] = ((float)localDouble.getY());
        paramPoint2D1.setLocation(localDouble);
        localObject[(i++)] = arrayOfFloat1[0];
        localObject[(i++)] = arrayOfFloat1[1];
        if (bool4) {
          break label570;
        }
        if (!bool3) {}
      }
      else
      {
        localObject[(i++)] = arrayOfFloat1[0];
        localObject[(i++)] = arrayOfFloat1[1];
      }
    }
    else {
      paramPoint2D1.setLocation(arrayOfFloat1[0], arrayOfFloat1[1]);
    }
    label570:
    w localw4 = a(bool2, bool2 ? localjd2 : paramtb.l(), localld2);
    arrayOfFloat1[0] = ((float)localw4.a());
    arrayOfFloat1[1] = ((float)localw4.b());
    if (!localPathIterator.isDone())
    {
      localPathIterator.currentSegment(arrayOfFloat1);
      localPathIterator.next();
    }
    do
    {
      if ((!bool4) && (bool3)) {
        break label734;
      }
      if ((bool4) || (i == localObject.length))
      {
        float[] arrayOfFloat2 = new float[localObject.length * 2];
        System.arraycopy(localObject, 0, arrayOfFloat2, 0, localObject.length);
        localObject = arrayOfFloat2;
      }
      localObject[(i++)] = arrayOfFloat1[0];
      localObject[(i++)] = arrayOfFloat1[1];
      if (!bool3) {
        break;
      }
      f2 = arrayOfFloat1[0];
      f3 = arrayOfFloat1[1];
    } while (bool4);
    label734:
    byte b3 = bool2 ? 1 : 3;
    ld localld4 = bool2 ? localjd2 : localld2;
    int j = i;
    if (j > 1)
    {
      arrayOfFloat1[1] = localObject[(--j)];
      arrayOfFloat1[0] = localObject[(--j)];
    }
    while (bool4)
    {
      if (bool3) {
        break label986;
      }
      if (!a(bool2, localld4, arrayOfFloat1[0], arrayOfFloat1[1]))
      {
        if (!bool4) {
          if (a(b3, localld4, localld2, f2, f3, arrayOfFloat1[0], arrayOfFloat1[1], localDouble))
          {
            j++;
            if (!bool4)
            {
              if (j + 2 > localObject.length)
              {
                float[] arrayOfFloat3 = new float[j + 4];
                System.arraycopy(localObject, 0, arrayOfFloat3, 0, localObject.length);
                localObject = arrayOfFloat3;
              }
              localObject[(++j)] = ((float)localDouble.x);
              localObject[(++j)] = ((float)localDouble.y);
              paramPoint2D2.setLocation(localDouble);
            }
            if (!bool4) {
              if (!bool3) {
                continue;
              }
            }
          }
          else
          {
            j++;
            paramPoint2D2.setLocation(f2, f3);
          }
        }
        if (!bool4) {
          if (!bool3) {
            continue;
          }
        }
      }
      else
      {
        f2 = arrayOfFloat1[0];
        f3 = arrayOfFloat1[1];
      }
      if (!bool3) {
        break;
      }
    }
    label986:
    float f4 = 0;
    float f5 = j - 1;
    float f6;
    float f7;
    float f8;
    float f9;
    float f10;
    if (f4 < f5)
    {
      f6 = (float)paramtb.I().g();
      if ((bool4) || (f6 > 0.0F))
      {
        f7 = 0.0F;
        do
        {
          if (f4 >= f5) {
            break;
          }
          if (bool4) {
            break label1198;
          }
          if (bool3) {
            break label1196;
          }
          if (f7 >= f6) {
            break;
          }
          f8 = localObject[(f4 + 2)] - localObject[f4];
          f9 = localObject[(f4 + 3)] - localObject[(f4 + 1)];
          f10 = (float)Math.sqrt(f8 * f8 + f9 * f9);
          f7 += f10;
          if (!bool4) {
            if (f7 > f6)
            {
              localObject[f4] = (localObject[(f4 + 2)] - (f7 - f6) * f8 / f10);
              localObject[(f4 + 1)] = (localObject[(f4 + 3)] - (f7 - f6) * f9 / f10);
              if (!bool4) {
                if (!bool3) {
                  break;
                }
              }
            }
            else
            {
              f4 += 2;
            }
          }
        } while (!bool3);
      }
    }
    label1196:
    if ((!bool4) && (f4 < f5))
    {
      label1198:
      f6 = (float)paramtb.H().g();
      if ((bool4) || (f6 > 0.0F))
      {
        f7 = 0.0F;
        do
        {
          if (f4 >= f5) {
            break;
          }
          if (bool4) {
            break label1398;
          }
          if (bool3) {
            break label1396;
          }
          if (f7 >= f6) {
            break;
          }
          f8 = localObject[(f5 - 2)] - localObject[f5];
          f9 = localObject[(f5 - 1)] - localObject[(f5 + 1)];
          f10 = (float)Math.sqrt(f8 * f8 + f9 * f9);
          f7 += f10;
          if (!bool4) {
            if (f7 > f6)
            {
              localObject[f5] = (localObject[(f5 - 2)] - (f7 - f6) * f8 / f10);
              localObject[(f5 + 1)] = (localObject[(f5 - 1)] - (f7 - f6) * f9 / f10);
              if (!bool4) {
                if (!bool3) {
                  break;
                }
              }
            }
            else
            {
              f5 -= 2;
            }
          }
        } while (!bool3);
      }
    }
    label1396:
    label1398:
    float f11;
    float f12;
    float f13;
    float f14;
    float f15;
    float f16;
    float f17;
    float f18;
    float f19;
    float f20;
    float f21;
    float f22;
    float f23;
    float f24;
    if (!bool4)
    {
      if (f4 < f5)
      {
        f6 = (float)paramtb.I().f() * f1;
        if ((bool4) || (f6 > 0.0F))
        {
          f7 = localObject[f4];
          f8 = localObject[(f4 + 1)];
          f9 = f6 * f6;
          label1806:
          label1812:
          do
          {
            if (f4 >= f5) {
              break;
            }
            f10 = localObject[f4] - f7;
            f11 = localObject[(f4 + 1)] - f8;
            f12 = f10 * f10 + f11 * f11;
            f13 = localObject[(f4 + 2)] - f7;
            f14 = localObject[(f4 + 3)] - f8;
            f15 = f13 * f13 + f14 * f14;
            if (bool4) {
              break label1837;
            }
            if (bool3) {
              break label1835;
            }
            if (f15 >= f9)
            {
              f16 = localObject[(f4 + 2)] - localObject[f4];
              f17 = localObject[(f4 + 3)] - localObject[(f4 + 1)];
              f18 = f16 * f16 + f17 * f17;
              f19 = 2.0F * (f10 * f16 + f11 * f17);
              f20 = f10 * f10 + f11 * f11 - f9;
              f21 = f19 * f19 - 4.0F * f18 * f20;
              if (!bool4)
              {
                if (f21 >= 0.0F)
                {
                  f22 = (float)Math.sqrt(f21);
                  f23 = (-f19 + f22) / (2.0F * f18);
                  if (bool4) {
                    break label1812;
                  }
                  if (f23 >= 0.0F)
                  {
                    if (bool4) {
                      break label1812;
                    }
                    if (f23 <= 1.0F)
                    {
                      localObject[f4] += f16 * f23;
                      localObject[(f4 + 1)] += f17 * f23;
                      if (bool4) {
                        break label1812;
                      }
                      if (f12 > 0.0F)
                      {
                        if (bool4) {
                          break label1806;
                        }
                        if (f4 >= 2)
                        {
                          f24 = (float)Math.sqrt(f12);
                          localObject[(f4 - 2)] = (localObject[f4] - f10 * 0.1F / f24);
                          localObject[(f4 - 1)] = (localObject[(f4 + 1)] - f11 * 0.1F / f24);
                          f4 -= 2;
                        }
                      }
                    }
                  }
                }
                b1 = (byte)(b1 | 0x4);
              }
              if (!bool4) {
                if (!bool3) {
                  break;
                }
              }
            }
            else
            {
              f4 += 2;
            }
          } while (!bool3);
        }
      }
      if (bool4) {}
    }
    else
    {
      label1835:
      if (f4 < f5)
      {
        label1837:
        f6 = (float)paramtb.H().f() * f1;
        if (bool4) {
          break label2281;
        }
        if (f6 > 0.0F)
        {
          f7 = localObject[f5];
          f8 = localObject[(f5 + 1)];
          f9 = f6 * f6;
          label2250:
          label2261:
          do
          {
            if (f4 >= f5) {
              break;
            }
            f10 = localObject[f5] - f7;
            f11 = localObject[(f5 + 1)] - f8;
            f12 = f10 * f10 + f11 * f11;
            f13 = localObject[(f5 - 2)] - f7;
            f14 = localObject[(f5 - 1)] - f8;
            f15 = f13 * f13 + f14 * f14;
            if (bool4) {
              break label2285;
            }
            if (bool3) {
              break label2283;
            }
            if (f15 >= f9)
            {
              f16 = localObject[(f5 - 2)] - localObject[f5];
              f17 = localObject[(f5 - 1)] - localObject[(f5 + 1)];
              f18 = f16 * f16 + f17 * f17;
              f19 = 2.0F * (f10 * f16 + f11 * f17);
              f20 = f10 * f10 + f11 * f11 - f9;
              f21 = f19 * f19 - 4.0F * f18 * f20;
              if (!bool4)
              {
                if (f21 >= 0.0F)
                {
                  f22 = (float)Math.sqrt(f21);
                  f23 = (-f19 + f22) / (2.0F * f18);
                  if (bool4) {
                    break label2261;
                  }
                  if (f23 >= 0.0F)
                  {
                    if (bool4) {
                      break label2261;
                    }
                    if (f23 <= 1.0F)
                    {
                      localObject[f5] += f16 * f23;
                      localObject[(f5 + 1)] += f17 * f23;
                      if (bool4) {
                        break label2261;
                      }
                      if (f12 > 0.0F)
                      {
                        if (bool4) {
                          break label2250;
                        }
                        if (f5 < localObject.length + 3)
                        {
                          f24 = (float)Math.sqrt(f12);
                          localObject[(f5 + 2)] = (localObject[f5] - f10 * 0.1F / f24);
                          localObject[(f5 + 3)] = (localObject[(f5 + 1)] - f11 * 0.1F / f24);
                          f5 += 2;
                        }
                      }
                    }
                  }
                }
                b1 = (byte)(b1 | 0x8);
                if (bool4) {
                  break label2281;
                }
              }
              if (!bool3) {
                break;
              }
            }
            f5 -= 2;
          } while (!bool3);
        }
      }
      paramGeneralPath2.reset();
    }
    label2281:
    label2283:
    if ((!bool4) && (f4 < f5))
    {
      label2285:
      paramGeneralPath2.moveTo(localObject[(f4++)], localObject[(f4++)]);
      f6 = f4;
      do
      {
        if (f6 > f5) {
          break;
        }
        paramGeneralPath2.lineTo(localObject[(f6++)], localObject[(f6++)]);
      } while (!bool3);
    }
    return b1;
  }
  
  public static byte a(tb paramtb, GeneralPath paramGeneralPath, Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    boolean bool5 = ld.E;
    boolean bool4 = ld.D;
    byte b1 = 0;
    h localh = paramtb.D;
    Point2D.Double localDouble = hb.a().i;
    localDouble.x = (localDouble.y = 0.0D);
    ld localld1 = paramtb.h();
    ld localld2 = paramtb.g();
    zd localzd1 = paramtb.k();
    zd localzd2 = paramtb.l();
    boolean bool1 = false;
    paramGeneralPath.reset();
    jd localjd1 = localld1.a(paramtb.h);
    jd localjd2 = localld2.a(paramtb.i);
    boolean bool2;
    if ((bool5) || (localjd1 != null))
    {
      w localw1 = jd.c((jd)localjd1);
      localObject1 = paramtb.c();
      if (!bool5) {}
      bool2 = w.a(localw1, (w)localObject1) < 1.0E-012D;
      if ((!bool5) && (!bool4)) {}
    }
    else
    {
      bool2 = false;
    }
    boolean bool3;
    if ((bool5) || (localjd2 != null))
    {
      localObject1 = jd.c((jd)localjd2);
      localObject2 = paramtb.d();
      if (!bool5) {}
      bool3 = w.a((w)localObject1, (w)localObject2) < 1.0E-012D;
      if (bool5) {
        break label224;
      }
      if (!bool4) {}
    }
    else
    {
      bool3 = false;
    }
    label224:
    Object localObject1 = bool2 ? localjd1 : localzd1;
    Object localObject2 = bool3 ? localjd2 : localzd2;
    int i = 0;
    w localw2 = a(bool2, localObject1, localld1);
    double d1 = localw2.a();
    double d2 = localw2.b();
    w localw3 = a(bool3, localObject2, localld2);
    double d3 = localw3.a();
    double d4 = localw3.b();
    v localv1 = localh.f();
    if (!bool5)
    {
      if (a(bool2, bool2 ? localjd1 : localld1, d1, d2))
      {
        double d5 = d1;
        d6 = d2;
        if (!bool5) {}
        byte b2 = bool2 ? 1 : 2;
        do
        {
          if (localv1 == null) {
            break;
          }
          eb localeb2 = (eb)localv1.c();
          bool1 = a(b2, localObject1, localld1, d5, d6, localeb2.b(), localeb2.c(), localDouble);
          if (bool4) {
            break label476;
          }
          if (bool1)
          {
            d1 = localDouble.x;
            d2 = localDouble.y;
            if (!bool5) {
              if (!bool4) {
                break;
              }
            }
          }
          else
          {
            d5 = localeb2.b();
            d6 = localeb2.c();
            localv1 = localv1.a();
            i++;
          }
        } while (!bool4);
        if ((!bool5) && (!bool1)) {
          label476:
          if (localv1 == null)
          {
            bool1 = a(b2, localObject1, localld1, d5, d6, d3, d4, localDouble);
            if (bool5) {
              break label531;
            }
            if (bool1)
            {
              d1 = localDouble.x;
              d2 = localDouble.y;
            }
          }
        }
        label531:
        if (bool5) {
          break label558;
        }
        if (!bool1) {
          return b1;
        }
      }
      paramPoint2D1.setLocation(d1, d2);
      bool1 = false;
    }
    label558:
    int j = localh.size();
    v localv2 = localh.g();
    if (a(bool3, bool3 ? localjd2 : localld2, d3, d4))
    {
      d6 = d3;
      d7 = d4;
      if (!bool5) {}
      byte b3 = bool3 ? 1 : 2;
      if (localv2 != null) {}
      while (bool5)
      {
        if (bool4) {
          break label2212;
        }
        double d9;
        double d11;
        if (i == j)
        {
          d9 = d1;
          d11 = d2;
          bool1 = a(b3, localObject2, localld2, d6, d7, d9, d11, localDouble);
          if (!bool5)
          {
            if (bool1)
            {
              d3 = localDouble.x;
              d4 = localDouble.y;
              if (bool5) {
                break label812;
              }
              if (!bool4) {}
            }
            else
            {
              paramGeneralPath.reset();
            }
          }
          else {
            return b1;
          }
        }
        else
        {
          eb localeb5 = (eb)localv2.c();
          d9 = localeb5.b();
          d11 = localeb5.c();
          bool1 = a(b3, localObject2, localld2, d6, d7, d9, d11, localDouble);
          if (!bool5)
          {
            if (bool1)
            {
              d3 = localDouble.x;
              d4 = localDouble.y;
              if (bool5) {
                break label812;
              }
              if (!bool4) {}
            }
            else
            {
              d6 = d9;
              d7 = d11;
              localv2 = localv2.b();
              j--;
            }
          }
          else {
            if (!bool4) {
              break;
            }
          }
        }
      }
      label812:
      if (!bool5) {
        if (!bool1)
        {
          bool1 = a(b3, localObject2, localld2, d6, d7, d1, d2, localDouble);
          if (bool5) {
            break label905;
          }
          if (bool1)
          {
            if ((bool5) || (a(bool2, bool2 ? localjd1 : localld1, localDouble.x, localDouble.y))) {
              bool1 = false;
            }
            d3 = localDouble.x;
            d4 = localDouble.y;
          }
        }
      }
      label905:
      if (bool5) {
        break label943;
      }
      if (!bool1) {
        return b1;
      }
    }
    paramPoint2D2.setLocation(d3, d4);
    double d6 = paramtb.u();
    double d7 = paramtb.I().g();
    label943:
    double d8;
    double d10;
    double d14;
    double d15;
    double d18;
    eb localeb8;
    if (!bool5)
    {
      if (d7 > 0.0D)
      {
        if (i == j)
        {
          d8 = d3;
          d10 = d4;
          if (!bool4) {}
        }
        else
        {
          eb localeb3 = (eb)localv1.c();
          d8 = localeb3.b();
          d10 = localeb3.c();
        }
        double d12 = d8 - d1;
        d14 = d10 - d2;
        d15 = Math.sqrt(d12 * d12 + d14 * d14);
        if (!bool5) {
          if (d15 > d7)
          {
            d18 = d7 / d15;
            d1 += d12 * d18;
            d2 += d14 * d18;
            if (bool5) {
              break label1414;
            }
            if (!bool4) {
              break label1401;
            }
          }
        }
        if (!bool5)
        {
          if (i >= j) {
            return b1;
          }
          if (bool5) {
            break label1414;
          }
        }
        if (i <= j)
        {
          d8 = d1;
          d10 = d2;
          d18 = 0.0D;
          do
          {
            if (i >= j) {
              break;
            }
            if (bool5) {
              break label1290;
            }
            if (bool4) {
              break label1288;
            }
            if (d18 >= d7) {
              break;
            }
            localeb8 = (eb)localv1.c();
            d12 = localeb8.b() - d8;
            d14 = localeb8.c() - d10;
            d15 = Math.sqrt(d12 * d12 + d14 * d14);
            d18 += d15;
            if (!bool5) {
              if (d18 >= d7)
              {
                d1 = localeb8.b() - d12 * (d18 - d7) / d15;
                d2 = localeb8.c() - d14 * (d18 - d7) / d15;
                if (!bool5) {
                  if (!bool4) {
                    break;
                  }
                }
              }
              else
              {
                d8 = localeb8.b();
                d10 = localeb8.c();
                localv1 = localv1.a();
                i++;
              }
            }
          } while (!bool4);
          if (bool5) {
            break label1410;
          }
          label1288:
          if (i == j)
          {
            label1290:
            if (bool5) {
              break label1414;
            }
            if (d18 < d7)
            {
              d12 = d3 - d8;
              d14 = d4 - d10;
              d15 = Math.sqrt(d12 * d12 + d14 * d14);
              d18 += d15;
              if (!bool5) {
                if (d18 >= d7)
                {
                  d1 = d3 - d12 * (d18 - d7) / d15;
                  d2 = d4 - d14 * (d18 - d7) / d15;
                  if (bool5) {
                    break label1414;
                  }
                  if (!bool4) {
                    break label1401;
                  }
                }
              }
              return b1;
            }
          }
        }
      }
      label1401:
      d7 = paramtb.H().g();
    }
    label1410:
    label1414:
    double d13;
    if (!bool5)
    {
      if (d7 > 0.0D)
      {
        if (i == j)
        {
          d8 = d1;
          d10 = d2;
          if (!bool4) {}
        }
        else
        {
          eb localeb4 = (eb)localv2.c();
          d8 = localeb4.b();
          d10 = localeb4.c();
        }
        d13 = d8 - d3;
        d14 = d10 - d4;
        d15 = Math.sqrt(d13 * d13 + d14 * d14);
        if (!bool5) {
          if (d15 > d7)
          {
            d18 = d7 / d15;
            d3 += d13 * d18;
            d4 += d14 * d18;
            if (bool5) {
              break label1888;
            }
            if (!bool4) {
              break label1872;
            }
          }
        }
        if (!bool5)
        {
          if (i >= j) {
            return b1;
          }
          if (bool5) {
            break label1888;
          }
        }
        if (i != j)
        {
          d8 = d3;
          d10 = d4;
          d18 = 0.0D;
          do
          {
            if (i >= j) {
              break;
            }
            if (bool5) {
              break label1761;
            }
            if (bool4) {
              break label1759;
            }
            if (d18 >= d7) {
              break;
            }
            localeb8 = (eb)localv2.c();
            d13 = localeb8.b() - d8;
            d14 = localeb8.c() - d10;
            d15 = Math.sqrt(d13 * d13 + d14 * d14);
            d18 += d15;
            if (!bool5) {
              if (d18 >= d7)
              {
                d3 = localeb8.b() - d13 * (d18 - d7) / d15;
                d4 = localeb8.c() - d14 * (d18 - d7) / d15;
                if (!bool5) {
                  if (!bool4) {
                    break;
                  }
                }
              }
              else
              {
                d8 = localeb8.b();
                d10 = localeb8.c();
                j--;
                localv2 = localv2.b();
              }
            }
          } while (!bool4);
          if (bool5) {
            break label1884;
          }
          label1759:
          if (i == j)
          {
            label1761:
            if (bool5) {
              break label1888;
            }
            if (d18 < d7)
            {
              d13 = d1 - d8;
              d14 = d2 - d10;
              d15 = Math.sqrt(d13 * d13 + d14 * d14);
              d18 += d15;
              if (!bool5) {
                if (d18 >= d7)
                {
                  d3 = d1 - (d18 - d7) * d13 / d15;
                  d4 = d2 - (d18 - d7) * d14 / d15;
                  if (bool5) {
                    break label1888;
                  }
                  if (!bool4) {
                    break label1872;
                  }
                }
              }
              return b1;
            }
          }
        }
      }
      label1872:
      d7 = paramtb.I().f() * d6;
    }
    label1884:
    label1888:
    double d19;
    if (!bool5)
    {
      if (d7 > 0.0D)
      {
        d8 = d1;
        d10 = d2;
        if (!bool5) {
          if (localv1 == null)
          {
            d13 = d3;
            d14 = d4;
            if (!bool4) {
              break label1951;
            }
          }
        }
        eb localeb6 = (eb)localv1.c();
        d13 = localeb6.b();
        d14 = localeb6.c();
        label1951:
        double d16 = d13 - d8;
        d18 = d14 - d10;
        d19 = Math.sqrt(d16 * d16 + d18 * d18);
        if (bool5) {
          break label2048;
        }
        if (d19 > d7)
        {
          d1 += d16 * d7 / d19;
          d2 += d18 * d7 / d19;
          b1 = (byte)(b1 | 0x4);
        }
      }
      d7 = paramtb.H().f() * d6;
      if (bool5) {
        break label2198;
      }
    }
    if (d7 > 0.0D)
    {
      label2048:
      d8 = d3;
      d10 = d4;
      if (!bool5) {
        if (localv2 == null)
        {
          d13 = d1;
          d14 = d2;
          if (!bool4) {
            break label2106;
          }
        }
      }
      eb localeb7 = (eb)localv2.c();
      d13 = localeb7.b();
      d14 = localeb7.c();
      label2106:
      double d17 = d13 - d8;
      d18 = d14 - d10;
      d19 = Math.sqrt(d17 * d17 + d18 * d18);
      if (bool5) {
        break label2198;
      }
      if (d19 > d7)
      {
        d3 += d17 * d7 / d19;
        d4 += d18 * d7 / d19;
        b1 = (byte)(b1 | 0x8);
      }
    }
    if (!bool5)
    {
      paramGeneralPath.moveTo((float)d1, (float)d2);
      label2198:
      if ((localv2 != null) && (localv1 != null) && (i < j))
      {
        label2212:
        localv2 = localv2.a();
        if (localv1 == localv2) {}
      }
      while (bool5)
      {
        eb localeb1 = (eb)localv1.c();
        paramGeneralPath.lineTo((float)localeb1.b(), (float)localeb1.c());
        localv1 = localv1.a();
        if (bool5) {
          break label2294;
        }
        if (bool4) {
          break label2292;
        }
        if (!bool4) {
          break;
        }
      }
    }
    paramGeneralPath.lineTo((float)d3, (float)d4);
    label2292:
    label2294:
    return b1;
  }
  
  private static boolean a(byte paramByte, Object paramObject, ld paramld, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, Point2D.Double paramDouble)
  {
    if (!ld.E) {}
    switch (paramByte)
    {
    case 1: 
      return ((jd)paramObject).a(paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble);
    case 2: 
      return ((zd)paramObject).a(paramld, paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble);
    case 3: 
      return ((ld)paramObject).b(paramDouble1, paramDouble2, paramDouble3, paramDouble4, paramDouble);
    }
    throw new IllegalArgumentException("Invalid type: " + paramByte);
  }
  
  private static boolean a(boolean paramBoolean, Object paramObject, double paramDouble1, double paramDouble2)
  {
    if (!ld.E) {
      if (paramBoolean) {
        return ((jd)paramObject).a(paramDouble1, paramDouble2);
      }
    }
    return ((ld)paramObject).f(paramDouble1, paramDouble2);
  }
  
  private static w a(boolean paramBoolean, Object paramObject, ld paramld)
  {
    if (paramBoolean) {
      return ((jd)paramObject).h();
    }
    zd localzd = (zd)paramObject;
    return new w(localzd.a(paramld), localzd.b(paramld));
  }
  
  public static byte b(tb paramtb, GeneralPath paramGeneralPath, Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    ld localld = paramtb.h();
    eb localeb = paramtb.b(0);
    double d1;
    double d2;
    double d3;
    double d4;
    double d5;
    if ((bool2) || ((localld.a(paramtb.h) != null) || (localld.a(paramtb.i) != null)))
    {
      localObject1 = paramtb.k();
      localObject2 = new w(((zd)localObject1).a(localld), ((zd)localObject1).b(localld));
      localObject3 = paramtb.l();
      w localw1 = new w(((zd)localObject3).a(localld), ((zd)localObject3).b(localld));
      w localw2 = new w(localeb.b(), localeb.c());
      if ((bool2) || (k.d((w)localObject2, localw1, localw2)))
      {
        d1 = ((w)localObject2).a();
        d2 = ((w)localObject2).b();
        d3 = (localw2.a() + d1) * 0.5D;
        d4 = (localw2.b() + d2) * 0.5D;
        d5 = Point2D.distance(d3, d4, d1, d2);
        d6 = 360.0D;
        double d7 = localw1.a() - d1;
        double d8 = localw1.b() - d2;
        if (!bool2)
        {
          if (d7 * d7 + d8 * d8 <= 1.0E-012D) {
            break label633;
          }
          paramGeneralPath.reset();
          paramGeneralPath.moveTo((float)d1, (float)d2);
          paramGeneralPath.lineTo((float)localw2.a(), (float)localw2.b());
          paramGeneralPath.lineTo((float)localw1.a(), (float)localw1.b());
        }
        return a(paramtb, paramGeneralPath, paramGeneralPath, paramPoint2D1, paramPoint2D2);
      }
      r localr = new r((w)localObject2, localw1, localw2);
      w localw3 = localr.a();
      d3 = localw3.a();
      d4 = localw3.b();
      d5 = localr.b();
      d1 = ((w)localObject2).a();
      d2 = ((w)localObject2).b();
      int i = k.a((w)localObject2, localw2, localw1);
      if (!bool2) {
        if (i == 0)
        {
          d6 = 360.0D;
          if ((!bool2) && (!bool1)) {
            break label633;
          }
        }
      }
      int j = k.a((w)localObject2, localw3, localw1);
      double d9;
      if (j == 0)
      {
        d9 = 180.0D;
        if (bool2) {
          break label549;
        }
        if (!bool1) {}
      }
      else
      {
        double d10 = ((w)localObject2).a() - d3;
        double d11 = ((w)localObject2).b() - d4;
        double d12 = localw1.a() - d3;
        double d13 = localw1.b() - d4;
        double d14 = k.b(Math.acos((d10 * d12 + d11 * d13) / (Math.sqrt(d10 * d10 + d11 * d11) * Math.sqrt(d12 * d12 + d13 * d13))));
        if (j == i)
        {
          d9 = 360.0D - d14;
          if (bool2) {
            break label549;
          }
          if (!bool1) {}
        }
        else
        {
          d9 = d14;
        }
      }
      label549:
      d6 = -i * d9;
      if (!bool2) {
        if (!bool1) {
          break label633;
        }
      }
    }
    else
    {
      d1 = paramtb.k().a(localld);
      d2 = paramtb.k().b(localld);
      d3 = (localeb.b() + d1) / 2.0D;
      d4 = (localeb.c() + d2) / 2.0D;
      d5 = Point2D.distance(d3, d4, d1, d2);
    }
    double d6 = 360.0D;
    label633:
    Object localObject1 = new Arc2D.Float(0);
    ((Arc2D.Float)localObject1).setFrameFromCenter(d3, d4, d3 - d5, d4 - d5);
    ((Arc2D.Float)localObject1).setAngleStart(new Point2D.Double(d1, d2));
    ((Arc2D.Float)localObject1).setAngleExtent(d6);
    Object localObject2 = ((Arc2D.Float)localObject1).getPathIterator(null, 0.2000000029802322D);
    Object localObject3 = new GeneralPath(1, 2);
    ((GeneralPath)localObject3).append((PathIterator)localObject2, false);
    byte b = a(paramtb, (GeneralPath)localObject3, localObject3 = new GeneralPath(1, paramtb.n() + 4), paramPoint2D1, paramPoint2D2);
    localObject2 = ((GeneralPath)localObject3).getPathIterator(null);
    paramGeneralPath.reset();
    paramGeneralPath.append((PathIterator)localObject2, false);
    return b;
  }
  
  public static byte c(tb paramtb, GeneralPath paramGeneralPath, Point2D paramPoint2D1, Point2D paramPoint2D2)
  {
    byte b = a(paramtb, paramGeneralPath, paramPoint2D1, paramPoint2D2);
    a(paramtb, paramGeneralPath);
    return b;
  }
  
  public static void a(tb paramtb, GeneralPath paramGeneralPath)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    int i = paramtb.n();
    if (i > 0)
    {
      PathIterator localPathIterator = paramGeneralPath.getPathIterator(null);
      if (localPathIterator.isDone()) {
        return;
      }
      GeneralPath localGeneralPath = new GeneralPath(1, paramtb.n() + 2);
      float[] arrayOfFloat1 = new float[2];
      float[] arrayOfFloat2 = new float[2];
      float[] arrayOfFloat3 = new float[2];
      float[] arrayOfFloat4 = new float[2];
      float[] arrayOfFloat5 = new float[2];
      localPathIterator.currentSegment(arrayOfFloat2);
      localPathIterator.next();
      localGeneralPath.moveTo(arrayOfFloat2[0], arrayOfFloat2[1]);
      localPathIterator.currentSegment(arrayOfFloat3);
      localPathIterator.next();
      a(arrayOfFloat2, arrayOfFloat3, arrayOfFloat5);
      label369:
      label372:
      do
      {
        do
        {
          do
          {
            if (localPathIterator.isDone()) {
              break label397;
            }
            localPathIterator.currentSegment(arrayOfFloat4);
            localPathIterator.next();
            if ((!bool2) && (bool1)) {
              break label422;
            }
            if (!bool2)
            {
              if (arrayOfFloat4[0] == arrayOfFloat3[0])
              {
                if (bool2) {
                  break label394;
                }
                if (arrayOfFloat4[1] == arrayOfFloat3[1]) {
                  break label372;
                }
              }
              arrayOfFloat1[0] = arrayOfFloat2[0];
              arrayOfFloat1[1] = arrayOfFloat2[1];
              arrayOfFloat2[0] = arrayOfFloat3[0];
              arrayOfFloat2[1] = arrayOfFloat3[1];
              arrayOfFloat3[0] = arrayOfFloat4[0];
              arrayOfFloat3[1] = arrayOfFloat4[1];
            }
            if (bool2) {
              break label369;
            }
            if (k.a(arrayOfFloat1[0], arrayOfFloat1[1], arrayOfFloat3[0], arrayOfFloat3[1], arrayOfFloat2[0], arrayOfFloat2[1]) == 0) {
              break;
            }
            localGeneralPath.lineTo(arrayOfFloat2[0] - arrayOfFloat5[0], arrayOfFloat2[1] - arrayOfFloat5[1]);
            a(arrayOfFloat2, arrayOfFloat3, arrayOfFloat5);
            localGeneralPath.quadTo(arrayOfFloat2[0], arrayOfFloat2[1], arrayOfFloat2[0] + arrayOfFloat5[0], arrayOfFloat2[1] + arrayOfFloat5[1]);
            if (bool2) {
              break label369;
            }
          } while (!bool1);
          a(arrayOfFloat2, arrayOfFloat3, arrayOfFloat5);
        } while (!bool1);
        arrayOfFloat5[0] = 0.0F;
        arrayOfFloat5[1] = 0.0F;
        if ((bool2) || (bool2)) {
          break label414;
        }
      } while (!bool1);
      label394:
      label397:
      localGeneralPath.lineTo(arrayOfFloat3[0], arrayOfFloat3[1]);
      paramGeneralPath.reset();
      label414:
      localPathIterator = localGeneralPath.getPathIterator(null, 1.0D);
      label422:
      paramGeneralPath.append(localPathIterator, false);
    }
  }
  
  private static void a(float[] paramArrayOfFloat1, float[] paramArrayOfFloat2, float[] paramArrayOfFloat3)
  {
    paramArrayOfFloat2[0] -= paramArrayOfFloat1[0];
    paramArrayOfFloat2[1] -= paramArrayOfFloat1[1];
    float f1 = (float)Math.sqrt(paramArrayOfFloat3[0] * paramArrayOfFloat3[0] + paramArrayOfFloat3[1] * paramArrayOfFloat3[1]);
    if (!ld.E) {}
    float f2 = f1 < 20.0F ? 0.5F : 10.0F / f1;
    paramArrayOfFloat3[0] = (f2 * paramArrayOfFloat3[0]);
    paramArrayOfFloat3[1] = (f2 * paramArrayOfFloat3[1]);
  }
  
  public static boolean a(Rectangle2D paramRectangle2D, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool = ld.E;
    double d1 = paramRectangle2D.getX();
    double d2 = paramRectangle2D.getX() + paramRectangle2D.getWidth();
    double d3 = paramRectangle2D.getY();
    double d4 = paramRectangle2D.getY() + paramRectangle2D.getHeight();
    int i = 0;
    int j = 0;
    if (!bool) {
      if (paramDouble1 <= d1) {
        i |= 0x1;
      }
    }
    if (!bool) {
      if (paramDouble1 >= d2) {
        i |= 0x2;
      }
    }
    if (!bool) {
      if (paramDouble2 <= d3) {
        i |= 0x4;
      }
    }
    if (!bool) {
      if (paramDouble2 >= d4) {
        i |= 0x8;
      }
    }
    if (!bool) {
      if (paramDouble3 <= d1) {
        j |= 0x1;
      }
    }
    if (!bool) {
      if (paramDouble3 >= d2) {
        j |= 0x2;
      }
    }
    if (!bool) {
      if (paramDouble4 <= d3) {
        j |= 0x4;
      }
    }
    if (!bool) {
      if (paramDouble4 >= d4) {
        j |= 0x8;
      }
    }
    if (!bool) {
      if ((i & j) != 0) {
        return false;
      }
    }
    if ((bool) || ((i | j) == 0)) {
      return true;
    }
    double d5 = (paramDouble4 - paramDouble2) / (paramDouble3 - paramDouble1);
    double d6 = paramDouble1 + (d4 - paramDouble2) / d5;
    if (!bool) {
      if (d6 > d1)
      {
        if (bool) {
          break label283;
        }
        if (d6 < d2) {
          return true;
        }
      }
    }
    label283:
    double d7 = paramDouble1 + (d3 - paramDouble2) / d5;
    if (!bool) {
      if (d7 > d1)
      {
        if (bool) {
          break label322;
        }
        if (d7 < d2) {
          return true;
        }
      }
    }
    label322:
    double d8 = paramDouble2 + (d1 - paramDouble1) * d5;
    if (!bool) {
      if (d8 > d3)
      {
        if (bool) {
          break label361;
        }
        if (d8 < d4) {
          return true;
        }
      }
    }
    label361:
    double d9 = paramDouble2 + (d2 - paramDouble1) * d5;
    if (!bool) {
      if (d9 > d3)
      {
        if (bool) {
          break label393;
        }
        if (d9 < d4) {
          return true;
        }
      }
    }
    label393:
    return false;
  }
  
  public static GeneralPath a(GeneralPath paramGeneralPath)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    PathIterator localPathIterator = paramGeneralPath.getPathIterator(null, 0.1D);
    Object localObject1 = new float[60];
    int i = 0;
    float[] arrayOfFloat = new float[2];
    Object localObject2;
    do
    {
      do
      {
        if (localPathIterator.isDone()) {
          break;
        }
        localPathIterator.currentSegment(arrayOfFloat);
        localObject1[(i++)] = arrayOfFloat[0];
        localObject1[(i++)] = arrayOfFloat[1];
        if (!bool2)
        {
          if (i == localObject1.length)
          {
            localObject2 = new float[Math.min(localObject1.length * 2, localObject1.length + 300)];
            System.arraycopy(localObject1, 0, localObject2, 0, localObject1.length);
            localObject1 = localObject2;
          }
          localPathIterator.next();
        }
      } while (!bool1);
      localObject2 = new GeneralPath(1, i / 2 + 5);
      ((GeneralPath)localObject2).moveTo(arrayOfFloat[0], arrayOfFloat[1]);
    } while (bool2);
    int j = i - 3;
    do
    {
      if (j < 0) {
        break;
      }
      float f1 = localObject1[(j--)];
      float f2 = localObject1[(j--)];
      if (!bool2)
      {
        if (bool1) {
          break label212;
        }
        ((GeneralPath)localObject2).lineTo(f2, f1);
      }
    } while (!bool1);
    label212:
    return localObject2;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.ye

 * JD-Core Version:    0.7.0.1

 */